package com.zhang.gulimall.common;

import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

public class robot {
    public static void main(String[] args) throws AWTException {
        Robot robot = new Robot();
        robot.delay(3000);
        while (true){
            //回篝火 gfee
            robot.keyPress(KeyEvent.VK_G);
            robot.delay(200);
            robot.keyRelease(KeyEvent.VK_G);
            robot.delay(100);
            robot.keyPress(KeyEvent.VK_F);
            robot.delay(200);
            robot.keyRelease(KeyEvent.VK_F);
            robot.delay(100);
            robot.keyPress(KeyEvent.VK_E);
            robot.delay(200);
            robot.keyRelease(KeyEvent.VK_E);
            robot.delay(100);
            robot.keyPress(KeyEvent.VK_E);
            robot.delay(200);
            robot.keyRelease(KeyEvent.VK_E);
            robot.delay(5000);
            //前进
            robot.keyPress(KeyEvent.VK_SPACE);
            robot.keyPress(KeyEvent.VK_W);
            robot.delay(2000);
            robot.keyRelease(KeyEvent.VK_W);
            robot.delay(100);
            //左转
            robot.keyPress(KeyEvent.VK_A);
            robot.delay(600);
            robot.keyRelease(KeyEvent.VK_A);
            //前进
            robot.keyPress(KeyEvent.VK_W);
            robot.delay(1500);
            robot.keyRelease(KeyEvent.VK_W);
            robot.keyRelease(KeyEvent.VK_SPACE);
            //战技
            robot.keyPress(KeyEvent.VK_SHIFT);
            robot.delay(100);
            robot.mousePress(InputEvent.BUTTON3_DOWN_MASK);
            robot.delay(100);
            robot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK);
            robot.keyRelease(KeyEvent.VK_SHIFT);
            robot.delay(7000);
            //后退
//            robot.keyPress(KeyEvent.VK_S);
//            robot.delay(4700);
//            robot.keyRelease(KeyEvent.VK_S);
//            robot.delay(100);
//
//            robot.keyPress(KeyEvent.VK_E);
//            robot.delay(100);
//            robot.keyRelease(KeyEvent.VK_E);
//            robot.delay(3000);
//
//            robot.keyPress(KeyEvent.VK_Q);
//            robot.delay(100);
//            robot.keyRelease(KeyEvent.VK_Q);
//            robot.delay(2000);

        }
    }
}
